package com.aspose.cells;

abstract class zq {
   protected Cells a;
   protected RowCollection b;
   private zbbj c = new zbbj();

   zq(Cells var1, RowCollection var2) {
      this.a = var1;
      this.b = var2;
   }

   public abstract void a();

   public abstract Row a(int var1);

   public abstract Row a(int var1, boolean var2);

   public abstract Row a(int var1, boolean var2, boolean var3, boolean var4);

   public abstract int b();

   public abstract void b(int var1);

   public int c(int var1) {
      int var2 = this.b.c.a(var1, this.b());
      if (var2 < 0) {
         this.b(-var2 - 1);
         return var2;
      } else {
         this.b(var2);
         return var2;
      }
   }

   public boolean a(Row var1, boolean var2, boolean var3) {
      int var4 = var1.a.f();
      if (var4 < 0) {
         var4 = -var4 - 1;
         if (var2) {
            this.b(var4);
            return false;
         }

         this.c.a(var1.a.h(), this.a);
         var4 = this.b.c.a(var4, this.c, -1);
         this.b(var4);
         zp var5 = this.b.c.f(var4);
         if (var3) {
            this.a.n();
         }

         var1.a = var5;
      } else {
         this.b(var4);
      }

      return true;
   }

   public Row b(int var1, boolean var2, boolean var3, boolean var4) {
      int var5 = this.b.c.a(var1, this.b());
      zp var6;
      if (var5 < 0) {
         var5 = -var5 - 1;
         if (var2) {
            this.b(var5);
            return null;
         }

         this.c.a(var1, this.a);
         var5 = this.b.c.a(var5, this.c, -1);
         this.b(var5);
         var6 = this.b.c.f(var5);
         if (var3) {
            this.a.n();
         }
      } else {
         this.b(var5);
         var6 = this.b.c.f(var5);
      }

      return new Row(this.a, this.b, var6, var4);
   }
}
